home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.006 / xemacs-1 / lib / xemacs-19.13 / lisp / term / x-win-xfree86.el < prev    next >
Encoding:
Text File  |  1995-08-11  |  2.0 KB  |  60 lines

  1. ;;; x-win-xfree86.el --- runtime initialization for XFree86 servers
  2. ;; Copyright (C) 1995 Sun Microsystems, Inc.
  3.  
  4. ;; Author: Ben Wing
  5. ;; Keywords: terminals
  6.  
  7. ;; This file is part of XEmacs.
  8.  
  9. ;; XEmacs is free software; you can redistribute it and/or modify it
  10. ;; under the terms of the GNU General Public License as published by
  11. ;; the Free Software Foundation; either version 2, or (at your option)
  12. ;; any later version.
  13.  
  14. ;; XEmacs is distributed in the hope that it will be useful, but
  15. ;; WITHOUT ANY WARRANTY; without even the implied warranty of
  16. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  17. ;; General Public License for more details.
  18.  
  19. ;; You should have received a copy of the GNU General Public License
  20. ;; along with XEmacs; see the file COPYING.  If not, write to the Free
  21. ;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  22.  
  23. ;;; Commentary:
  24.  
  25. ;; This file is loaded by x-win.el at run-time when we are sure that XEmacs
  26. ;; is running on the display of something running XFree86 (Linux,
  27. ;; NetBSD, FreeBSD, and perhaps other Intel Unixen).
  28.  
  29. ;;; #### bleck!!! Use key-translation-map!
  30.  
  31. ;; For no obvious reason, shift-F1 is called F13, although Meta-F1 and
  32. ;; Control-F1 have normal names.
  33.  
  34. (let ((mapping '((f13 . (shift f1))
  35.          (f14 . (shift f2))
  36.          (f15 . (shift f3))
  37.          (f16 . (shift f4))
  38.          (f17 . (shift f5))
  39.          (f18 . (shift f6))
  40.          (f19 . (shift f7))
  41.          (f20 . (shift f8))
  42.          (f21 . (shift f9))
  43.          (f22 . (shift f10))
  44.          (f23 . (shift f11))
  45.          (f24 . (shift f12)))))
  46.  
  47.   ;; now define them and also the control, meta, and meta-control versions.
  48.   (while mapping
  49.     (let* ((foo (caar mapping))
  50.        (bar (cdar mapping))
  51.        (foo (if (listp foo) foo (list foo)))
  52.        (bar (if (listp bar) bar (list bar))))
  53.       (let ((mods '(() (control) (meta) (meta control))))
  54.     (while mods
  55.       (let ((k1 (vector (append (car mods) foo)))
  56.         (k2 (vector (append (car mods) bar))))
  57.         (define-key global-map k1 k2))
  58.       (setq mods (cdr mods))))
  59.       (setq mapping (cdr mapping)))))
  60.